package client;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;

import javax.jnlp.BasicService;
import javax.jnlp.ServiceManager;
import javax.swing.JFrame;

public class IHM extends JFrame{

	private PanneauConnexion connX = new PanneauConnexion();
	private PanneauMenu menu = new PanneauMenu();

	public IHM(int parIDPanel)
	{
		this.setTitle("Sujet 13 : DataUpdater2010");
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		this.setVisible(true);
		this.setResizable(false);
		if(parIDPanel == 1)
		{	
			this.setSize(500, 150);
			this.connX.ok.addActionListener(new ConnecterBehavior());
			this.setContentPane(connX);
			
		}
		else
		{
			this.setSize(1024, 768);
			this.setContentPane(menu);
		}
		this.setLocationRelativeTo(null);
	}

	public static void main(String args[]) {
		new IHM(1);
	}

/*	public void actionPerformed(ActionEvent event)
	{
		if(event.getSource()== connX.ok)
		{
			new IHM(2);
			this.dispose();
		}
	}*/

}

